<div class="section-title">
	Noticias
</div>

<?php
while ($contents->hasNext()) { 
	$content = $contents->next();
?>
	<div class="content">
		<div class="title">
			<?php
			//echo  $this->Html->link($content['Content']['title'], array('controller' => 'contents', 'action' => 'detail', $content['Content']['id'], str_replace(array('!', ' ', '/'), '-', $content['Content']['title'])));
			?>
		</div>
		<div class="date">
			<?php
			echo date('d/m/Y', strtotime($content->date));
			?>
		</div>
		<div class="intro">
			<?php
			echo $content->intro;
			?>
			<?php
			if (trim($content->body)) {
				/*echo $this->Html->link(
					'Ver más',
					array('controller' => 'contents', 'action' => 'detail', $content['Content']['id'], str_replace(array('!', ' ', '/'), '-', $content['Content']['title'])),
					array('class' => 'leer-mas')
				);*/
			}
			?>
		</div>
		<div class="share">
			<a href="https://twitter.com/share" data-size="large"
				class="twitter-share-button"
				data-url="http://fergieargentina.com<?php //echo $this->Html->url(array('controller' => 'contents', 'action' => 'detail', $content['Content']['id'])); ?>"
				data-text="<?php echo $content->title; ?>"
				data-via="FergieArgentina" data-count="none"
			>Tweet</a>
			<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
			<div class="fb-like face-like-button"
					data-href="http://fergieargentina.com<?php //echo $this->Html->url(array('controller' => 'contents', 'action' => 'detail', $content['Content']['id'])); ?>"
					data-send="false" data-width="50" data-show-faces="false"
			></div>
		</div>
		<div class="footer">
			<label>Categoría:</label>
			<?php //echo $this->Html->link($content['Category']['name'], array('controller' => 'contents', 'action' => 'index', 'category' => $content['Category']['id'] . '-' . $content['Category']['name'])); ?>
			<?php /*if (!empty($content['Content']['tags'])) { ?>
				<label>Tags:</label>
				<?php
				$result = '';
				foreach ($content['Content']['tags'] as $tag) {
					$result .= $this->Html->link($tag['Tag']['name'], array('controller' => 'contents', 'action' => 'index', 'tag' => $tag['Tag']['id'] . '-' . $tag['Tag']['name'])) . ', ';
				}
				echo substr($result, 0, -2);
				?>
			<?php }*/ ?>
		</div>
	</div>
<?php } ?>
<div class="paginator">
	<div class="left counter">
		<b>Página</b> <?php echo $page; ?> de <?php echo $totalPages; ?> | <b>Total:</b> <?php echo $totalContents; ?> noticias.
	</div>
	<div class="left">
		<a href="<?php echo $Router->getWebroot(); ?>contents/home/page:<?php echo $page - 1;?>">Anterior</a>
	</div>
	<div class="numbers">
		<?php //echo $paginator->numbers(array('separator' => '')); ?>
	</div>
	<div class="left">
		<a href="<?php echo $Router->getWebroot(); ?>contents/home/page:<?php echo $page + 1;?>">Siguiente</a>
	</div>
</div>